<!DOCTYPE html>
<html style="background-color: #F2F2F2;">
<head>
	
	<title><?php echo _MANAGER_TITLE_; ?></title>

	<?php $this->setFlag('list,vue'); ?>
	<?php $this->import('meta'); ?>

	<link rel="stylesheet" type="text/css" href="html/console/record/css/autolog.css" />

    <script type="text/javascript" src="html/console/record/js/autolog.js?v=10"></script>

</head>
<body>

	<div style="display: none;"></div>
	<div id="loadSpin" class="bg"></div>

	<div id="mainBg" class="bg" style="display: none;">

		<input type="text" id="moduleInfo" class="display-none" />
        <input type="text" id="operaterInfo" class="display-none" />
        <input type="text" id="statusInfo" class="display-none" />
        <input type="text" id="dateInfo" class="display-none" value="0" />
        <input type="text" id="tempid" class="display-none" />
        <input type="text" id="menuid" class="display-none" />

        <div class="condition-bar">
			<div class="option-bar">
                <div class="option-item" onclick="showOption('4')">
                    <span id="optionItemText4" class="option-item-text">今天</span>
                    <span><img id="optionItemimg4" src="static/pic/app/option_down.png" class="option-item-img" /></span>
                </div>
                <div class="option-item" onclick="showOption('3')">
                    <span id="optionItemText3" class="option-item-text">状态</span>
                    <span><img id="optionItemimg3" src="static/pic/app/option_down.png" class="option-item-img" /></span>
                </div>
				<div class="option-item" onclick="showOption('1')">
                    <span id="optionItemText1" class="option-item-text">模块</span>
                    <span><img id="optionItemimg1" src="static/pic/app/option_down.png" class="option-item-img" /></span>
                </div>
                <div class="option-item" onclick="showOption('2')">
                    <span id="optionItemText2" class="option-item-text">人员</span>
                    <span><img id="optionItemimg2" src="static/pic/app/option_down.png" class="option-item-img" /></span>
                </div>
			</div>
		</div>
		<div class="condition-empty-area"></div>

		<div class="count-bar">
			共 <span id="listCount" class="count-color">0</span> 条日志
		</div>

		<div id="listBar">
			<div v-bind:id="'logInfo' + info.logid" v-for="info in list">
				<div class="list-bar" v-on:click="viewAutolog(info.logid)">
        			<div class="list-title">{{ info.module }}</div>
        			<div class="list-remark">
        				<div class="list-remark-left">操作时间：{{ info.starttime }} ~ {{ info.endtime.split(' ')[1] }}</div>
        			</div>
                    <div class="list-remark2">
                        <div class="list-remark-left">操作人员：{{ info.operater }}</div>
                    </div>
                    <div class="list-remark2">
                        <div class="list-remark-left">
                        	执行结果：<template v-if="info.status == '0'"><span class="tc4">[正在执行中]</span></template>
	                        <template v-else-if="info.status == '1'"><span class="tc2">[成功]</span></template>
	                        <template v-else-if="info.status == '2'"><span class="tc1">[失败]</span></template>
	                        <template v-else-if="info.status == '3'"><span class="tc1">[强制中止]</span></template>
	                        <template v-else-if="info.status == '4'"><span class="tc4">[已修复]</span></template>
	                        <template v-else><span class="tc3">[状态异常]</span></template>

	                        <template v-if="info.status == '1'"><span class="tc2">{{ info.result }}</span></template>
	                        <template v-else-if="info.status == '2'"><span class="tc1">{{ info.result }}</span></template>
	                        <template v-else><span class="tc3">{{ info.result }}</span></template>
                        </div>
                    </div>
        		</div>
                <div class="list-tool">
                    <input type="checkbox" name="isSelect" class="slipmore-checkbox" v-bind:value="info.logid" onclick="selectOne()" /></td>
                    <div class="list-tool-left"></div>
                    <template v-if="permission.handlelog == 'yes'">
                    	<template v-if="info.status == '0'">
	                        <div class="list-tool-btn3" v-on:click="stopAutolog(info.logid)">强制中止</div>
	                    </template>
	                    <template v-else-if="info.status == '2'">
	                        <div class="list-tool-btn" v-on:click="repairAutolog(info.logid)">确认修复</div>
	                    </template>
                    </template>
                    <template v-if="permission.deleteinfo == 'yes'">
                    	<div class="list-tool-btn2" v-on:click="deleteAutolog(info.logid)">删除日志</div>
                    </template>
                </div>
				<div class="list-separate"></div>
			</div>
		</div>

		<?php $this->import('page'); ?>
		<?php $this->import('totop'); ?>
		<?php $this->import('slipiframe'); ?>
		<?php $this->import('slipoption'); ?>
		<?php $this->import('slipmore'); ?>

		<div id="optionItemFloatDiv1" class="option-item-float-div1" style="display: none;">
        	<div class="select-item" onclick="selectOption(this, '', 'moduleInfo', '模块')">
                <div class="select-text-click">全部</div>
                <img class="select-img" src="static/pic/app/option_click.png" />
            </div>
        </div>

        <div id="optionItemFloatDiv2" class="option-item-float-div2" style="display: none;">
        	<div class="select-item" onclick="selectOption(this, '', 'operaterInfo', '人员')">
                <div class="select-text-click">全部</div>
                <img class="select-img" src="static/pic/app/option_click.png" />
            </div>
        </div>

        <div id="optionItemFloatDiv3" class="option-item-float-div3" style="display: none;">
        	<div class="select-item" onclick="selectOption(this, '', 'statusInfo', '状态')">
                <div class="select-text-click">全部</div>
                <img class="select-img" src="static/pic/app/option_click.png" />
            </div>
            <div class="select-item" onclick="selectOption(this, '0', 'statusInfo', '执行中')">
                <div class="select-text">正在执行中</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
            <div class="select-item" onclick="selectOption(this, '1', 'statusInfo', '成功')">
                <div class="select-text">成功</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
            <div class="select-item" onclick="selectOption(this, '2', 'statusInfo', '失败')">
                <div class="select-text">失败</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
            <div class="select-item" onclick="selectOption(this, '3', 'statusInfo', '被中止')">
                <div class="select-text">强制中止</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
        </div>

        <div id="optionItemFloatDiv4" class="option-item-float-div4" style="display: none;">
        	<div class="select-item" onclick="selectOption(this, '', 'dateInfo', '时间')">
                <div class="select-text">全部</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
            <div class="select-item" onclick="selectOption(this, '0', 'dateInfo', '今天')">
                <div class="select-text-click">今天</div>
                <img class="select-img" src="static/pic/app/option_click.png" />
            </div>
            <div class="select-item" onclick="selectOption(this, '1', 'dateInfo', '近两天')">
                <div class="select-text">近两天</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
            <div class="select-item" onclick="selectOption(this, '2', 'dateInfo', '近七天')">
                <div class="select-text">近七天</div>
                <img class="select-img" src="static/pic/app/option_click.png" style="display: none;" />
            </div>
        </div>

        <div id="slipMoreBtnBar" style="display: none;"></div>

        <script type="text/javascript">
            var autolog = new Vue({
                el: '#listBar',
                data: {
                    list: '',
	                permission: ''
                }
            });
        </script>
		
	</div>

</body>
</html>